home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / progtool / modula2 / module / mousepos.mod < prev    next >
Text File  |  1995-11-25  |  589b  |  24 lines

  1. IMPLEMENTATION MODULE  MousePosition;
  2.  
  3. FROM SYSTEM IMPORT ADR;
  4. FROM AES IMPORT GrafMouseKeyboardState,ApplTPlayback,WindowFind;
  5.  
  6. PROCEDURE GetMousePos(VAR MouseX, MouseY, Window : INTEGER);
  7. VAR Dummy : INTEGER;
  8. BEGIN
  9.    GrafMouseKeyboardState(MouseX,MouseY,Dummy,Dummy);
  10.    Window:=WindowFind(MouseX,MouseY)
  11. END  GetMousePos;
  12.  
  13. PROCEDURE SetMousePos( MouseX, MouseY : INTEGER);
  14. VAR Play : ARRAY [0..3] OF INTEGER;
  15. BEGIN
  16.     Play[0]:=0;
  17.     Play[1]:=2;
  18.     Play[2]:=MouseX;
  19.     Play[3]:=MouseY;
  20.     ApplTPlayback(ADR(Play),1,1);
  21. END  SetMousePos;
  22.  
  23. END  MousePosition.
  24.